package com.bootdo.system.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bootdo.system.dao.ShareRecordMapper;
import com.bootdo.system.domain.ShareRecord;
import com.bootdo.system.service.ShareRecordService;
import com.github.pagehelper.PageHelper;



@Service("shareRecordService")
public class ShareRecordServiceImpl implements ShareRecordService {
	@Autowired
	private ShareRecordMapper mapper;

	@Override
	public ShareRecord get(Long id) {
		return mapper.get(id);
	}

	@Override
	public List<ShareRecord> list(Map<String, Object> map) {
		PageHelper.startPage(Integer.parseInt(map.get("pageNum").toString()),Integer.parseInt(map.get("pageSize").toString()));
		return mapper.list(map);
	}

	@Override
	public int save(ShareRecord bComments) {
		return mapper.save(bComments);
	}

	@Override
	public int update(ShareRecord bComments) {
		return mapper.update(bComments);
	}

	@Override
	public int minusCount(Long id) {
		return mapper.minusCount(id);
	}

	@Override
	public int remove(Long id) {
		return mapper.remove(id);
	}

}
